if SERVER then
	registerCommand("kick", "Kicks the player you specify, you may optionally specify a reason",function(param)
		local kickReason = "caller kicked target for reason"
		local kickNoReason = "caller kicked target, reason not given"
		if param["settings"]["kick_with_reason_msg"] then
			kickReason = param["settings"]["kick_with_reason_msg"]
		end
		if param["settings"]["kick_without_reason_msg"] then
			kickNoReason = param["settings"]["kick_without_reason_msg"]
		end
		local kickTable = {}
		kickTable["caller"] = getCaller(param[1])
		local targs = string.Explode(" ", param[3])
		local why = ""
		if not getPlayerByName(targs[table.Count(targs)]) then
			why = targs[table.Count(targs)]
			table.remove(targs, table.Count(targs))
		end
		for i, targ in pairs(targs) do
			local plyTarg = getPlayerByName(targ)
			if plyTarg && targ != "" then
				if why then
					kickTable["target"] = plyTarg:GetName()
					if why != "" then
						kickTable["reason"] = why
						display(param[1], "kick", { plyTarg }, parseDisplayMessage(kickReason, kickTable))
						game.ConsoleCommand("kickid " .. plyTarg:UserID() .. "\"" .. why .. "\n")
					else
						display(param[1], "kick", { plyTarg }, parseDisplayMessage(kickNoReason, kickTable))
						game.ConsoleCommand("kickid " .. plyTarg:UserID() .. "\n")
					end
				end
			end
		end
	end)
end